package exam.business.service;

import exam.common.constant.ResultPort;
import exam.common.key.KeyQuestion;
import exam.common.util.ConvertUtils;
import exam.model.dao.TQuestionDAO;
import exam.system.business.AbstractService;
import exam.system.business.BusinessServiceInfo;
/**
 * <p>QuestionDeleteService</p>
 * <br>
 * <p>Xu ly xoa cau hoi</p>
 * 
 * @author Phong
 * @version 21/5/2012
 */

public class QuestionDeleteService extends AbstractService {
	// tQuestionDAO
	private TQuestionDAO tQuestionDAO = new TQuestionDAO();
	@Override
	public String executeService(BusinessServiceInfo serviceInfo)
			throws Exception {
		// lay questionId tu serviceInfo
		String questionId = serviceInfo.getString(KeyQuestion.QUESTION_ID);
		// goi method xoa cau hoi
		tQuestionDAO.deleteQuestion(ConvertUtils.convertStringToLong(questionId));
		return ResultPort.SUCCESS;
	}

}
